package com.banmoon.composite;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
public abstract class OrganizationComponent {

    private String name;// 名称
    private String desc;// 简介

    public void add(OrganizationComponent component){
        // 默认实现，抛出不支持操作异常
        throw new UnsupportedOperationException();
    }

    public void remove(OrganizationComponent component){
        throw new UnsupportedOperationException();
    }

    public abstract void show();

}
